﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace ZJK.Models.ExpertManage
{
    using DB_NH.DB_Model.ZJK;

    public class Index
    {
        #region 查询条件类
        /// <summary>
        /// 查询条件类
        /// </summary>
        public class QueryInfo
        {
            /// <summary>
            /// 专家姓名
            /// </summary>
            public string ExpertName { get; set; }

            /// <summary>
            /// 固定电话
            /// </summary>
            public string ExpertPhone { get; set; }

            /// <summary>
            /// 移动电话
            /// </summary>
            public string ExpertMobile { get; set; }

            /// <summary>
            /// 专业
            /// </summary>
            public string ExpertProfession { get; set; }

            /// <summary>
            /// 所属行业
            /// </summary>
            public string ExpertCatogoryID { get; set; }

            /// <summary>
            /// 专家所在省份
            /// </summary>
            public string ExpertArea { get; set; }

            /// <summary>
            /// 专家所在城市
            /// </summary>
            public string ExpertCity { get; set; }

            /// <summary>
            /// 专家停用标志
            /// </summary>
            public DB_NH.DB_Common.ZJKConst.EXP_STOP_STATUS ExpertStopStatus { get; set; }

        }
        #endregion

        #region 专家分类记录类
        public class CategoryForModel{
            public string CategoryId {get;set;}
            public string CategoryName { get; set; }
        }
        #endregion

        #region 专家列表类
        public class ExpertForModel
        {
            /// <summary>
            /// 专家ID
            /// </summary>
            public string ExpertId { get; set; }

            /// <summary>
            /// 专家姓名
            /// </summary>
            public string ExpertName { get; set; }

            /// <summary>
            /// 专家性别
            /// </summary>
            public string ExpertSex { get; set; }

            /// <summary>
            /// 专家工作单位
            /// </summary>
            public string ExpertCompany { get; set; }

            /// <summary>
            /// 职务
            /// </summary>
            public string ExpertPosistion { get; set; }

            /// <summary>
            /// 毕业院校
            /// </summary>
            public string ExpertEducation { get; set; }

            /// <summary>
            /// 专业
            /// </summary>
            public string ExpertProfessional { get; set; }

            /// <summary>
            /// 学位
            /// </summary>
            public string ExpertDegree { get; set; }

            /// <summary>
            /// 毕业院校
            /// </summary>
            public string ExpertGraduation { get; set; }

            /// <summary>
            /// 所在区省
            /// </summary>
            public string ExpertArea { get; set; }

            /// <summary>
            /// 所在城市
            /// </summary>
            public string ExpertCity { get; set; }

            /// <summary>
            /// 职称
            /// </summary>
            public string ExpertTitle { get; set; }

            /// <summary>
            /// 工作电话
            /// </summary>
            public string ExpertPhoneWork { get; set; }

            /// <summary>
            /// 家庭电话
            /// </summary>
            public string ExpertPhoneHome { get; set; }

            /// <summary>
            /// 手机
            /// </summary>
            public string ExpertMobile { get; set; }

            /// <summary>
            /// 所处分类
            /// </summary>
            public List<CategoryForModel> ExpertCategorys { get; set; }
        }
        #endregion

        /// <summary>
        /// 操作标志
        /// </summary>
        public string OPFlag { get; set; }

        /// <summary>
        /// 查询条件
        /// </summary>
        public QueryInfo queryInfo { get; set; }

        /// <summary>
        /// 当前专家所属分类
        /// </summary>
        public List<CategoryForModel> categoryList { get; set; }

        /// <summary>
        /// 当前专家列表查询结果
        /// </summary>
        public List<ExpertForModel> expertList { get; set; }


        /// <summary>
        /// 记录总数
        /// </summary>
        public int RecordCount { get; set; }

        /// <summary>
        /// 每页记录数
        /// </summary>
        public int PageSize { get; set; }

        /// <summary>
        /// 页索引
        /// </summary>
        public int PageIndex { get; set; }

        /// <summary>
        /// 页数
        /// </summary>
        public int PageCount
        {
            get
            {
                int i_count = this.RecordCount / this.PageSize;
                if ((this.RecordCount % this.PageSize) > 0)
                {
                    i_count++;
                }
                return i_count;
            }
        }

        public Index()
        {
            queryInfo = new QueryInfo()
            {
                ExpertCatogoryID = string.Empty,
                ExpertMobile = string.Empty,
                ExpertName = string.Empty,
                ExpertPhone = string.Empty,
                ExpertProfession = string.Empty,
                ExpertStopStatus = DB_NH.DB_Common.ZJKConst.EXP_STOP_STATUS.USED
            };
            expertList = new List<ExpertForModel>();
            categoryList = new List<CategoryForModel>();

            //默认每页记录数20
            PageSize = 20;

            //默认为第一页
            PageIndex = 1;
        }
    }
}